#include "bitconverter.h"

std::string BitConverter::ToString(uint8_t *buffer, int offset, int count)
{
    std::string str;
    uint8_t *ptr = (buffer + offset);
	
    while(*ptr != '\0')
    {
        str += ((char)*ptr);
        ptr++;
        if(count > 0)
        {
            count--;
            if(count == 0)
                break;
        }
    }

    return str;
}